package cn.com.msui.service.identity;

import java.util.List;

import cn.com.msui.domain.ViewItem;
import cn.com.msui.domain.identity.User;
import cn.com.msui.service.BaseService;

/**
 * 与用户管理有关的服务
 * 
 * @author Yuegz
 * 
 */
public abstract class UserService extends BaseService {

	/**
	 * 通过ID获取用户信息
	 * 
	 * @param id
	 * @return
	 */
	public abstract User getUserById(String id) throws Exception;

	/**
	 * 增加一个用户
	 * 
	 * @param user
	 */
	public abstract void addUser(User user) throws Exception;

	/**
	 * 用户注册
	 * 
	 * @param user
	 */
	public abstract void register(User user) throws Exception;

	/**
	 * 根据条件获取用户信息
	 * 
	 * @param view
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public abstract List<User> getUsers(ViewItem view, User user) throws Exception;

	/**
	 * 通过ID批量删除用户
	 * 
	 * @param userIds
	 * @throws Exception
	 */
	public abstract void removeUsers(String[] userIds) throws Exception;

	/**
	 * 修改用户
	 * 
	 * @param user
	 * @throws Exception
	 */
	public abstract void modifyUser(User user) throws Exception;

	/**
	 * 通过账号获取一个用户
	 * 
	 * @param account
	 * @return
	 * @throws Exception
	 */
	public abstract User getUserByAccount(String account) throws Exception;
}
